<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" xmlns:data="http://www.w3.org/1999/xhtml">

<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<head th:include="include/include">
</head>
<style>
    <!--修改验证图标位置-->
    .form-group  .form-control-feedback {
        top: 0;
        right: -25px;
    }
    .form-control + .form-control-feedback {
        top: 0;
        width: 20px;
        height: 20px;
        line-height: 20px;
    }
    .my-form-control + .form-control-feedback{
        top: 0;
        width: 20px;
        height: 20px;
        line-height: 20px;
    }
    .select-form-control + .form-control-feedback{
        top: 0;
        right: -25px;
        width: 20px;
        height: 20px;
        line-height: 20px;
    }
    /*去除左边空白*/
    .modal.fade.in{
        /* padding-right: 17px;*/
        padding-left:  0 !important;

    }
    /*去除顶部空白*/
    .modal-dialog{
        margin-top: 0 !important;
    }
    .modal-open .modal{
        overflow-y:hidden;

    }
</style>
<script>
    var losser="";//定损人名称
    var taskId=0;//任务id
function resizeHtml(){
   var h= parent.document.getElementById("caseIframe").height;
   console.log("获取到的高度值："+h);
   //$("#allContent").height(100);
}
    // 供父页面调用为某些项赋值的函数
    function getParentData(val,data){//车牌，案件id，定损id， 定损员名字
        // document.getElementById("caseNo").value = val;
        if(data!=""){
            var datas=data.split(",");
            $("#caseNo").val(datas[0]);
            taskId=datas[1];
            $("#taskStatus option[value='" + data[2]+ "']").attr("selected", "selected");
            if(datas[3]!=''&& typeof datas[3]!='undefined'){
                var d = new Date(datas[3]);
                var times=d.getFullYear() + '-' + (d.getMonth() + 1) + '-' + d.getDate() + ' ' + d.getHours() + ':' + d.getMinutes() + ':' + d.getSeconds();
                $("#caseReportTime").val(times);
            }
            $("#recognizee").val(datas[5]);
            $("#licenceNo").val(datas[6]);
            $("#factDriver").val(datas[7]);
            $("#factDriverIdCard").val(datas[8]);
            $("#driver").val(datas[4]);
            $("#bizNo").text(datas[9]);
            $(".licenceNo").text(datas[6]);
            $("#forceNo").text(datas[10]);
            $(".modleName").text(datas[11]);
            $(".beibaoxianren").text(datas[5]);
            $("#forceExpireDate").text(datas[12]);
            $("#businessExpireDate").text(datas[13]);
            $("#accidentDuty option[value='"+data[14]+"']").prop("selected",true);

            $("#accidentDutyPercent").val(datas[15]);

            $("#claimFee").val(datas[16]);
            $("#caseIdHiden").val(datas[0]);
        }
    }
    //获取定损信息
    function  getfiexedLossTask(){
        $.post("claimTaskRelation/query",{lpid:taskId},function(data){
            // var json=JSON.stringify(data.data);
            $.each(data.data,function(index,item){
                if(item.type!=3){
                    addItems('',item.type+1,item.ids,item.dsuserid,item.renwuNo,item.dingsunzonge,item.hejiazonge,item.state,item.type,item.hejiayijian);
                    //$("#tr_localCarAdd").before();
                }
            })

        })


    }
    //获取人伤信息
    function findHumanInjuryInfo(taskId){
        $.get("claimTaskRelation/findTaskAndHumanInjuryInfoByPage",
            {limit:50,offset:0,page:1,type:3,lpid:taskId},
            function (data){
                if(data!=null&&data.rows!=null){
                    $.each(data.rows,function(index,item){
                        if(item.humanInjuryInfo!=null){
                            humanInjuryInfoAddTr(item.humanInjuryInfo.xm,item.humanInjuryInfo.xb,item.humanInjuryInfo.nl,item.humanInjuryInfo.hj,item.humanInjuryInfo.jtzt,item.humanInjuryInfo.zlfs,item.humanInjuryInfo.jzyy,item.dingsunzonge,item.hejiazonge,item.state,item.renwuNo)
                        }else{
                            humanInjuryInfoAddTr('','','','','','','',item.dingsunzonge,item.hejiazonge,item.state,item.renwuNo)
                        }
                    })


                }


        })
    }
   /* 获取查勘信息*/
    function getInvestigation (id){
        $.get("investigation/getOne",{taskid:id},function(data){
            var json=JSON.stringify(data);
            //alert(json);
            var zjsj=data.zjsj;//准驾车型
            if(zjsj=="01-小型汽车号牌"){
                zjsj=="1";
            }
            $("#factDriverAbleCarModel option[value='"+zjsj+"']").prop("selected",true);
            var sfzdjsy=data.sfzdjsy;//是否指定驾驶员
            if(sfzdjsy=="是"){
                sfzdjsy="0";
            }else{
                sfzdjsy="1";
            }
            $("input[name='isSpecialDriver']").each(function () {
                if ($(this).val() == sfzdjsy) {
                    $(this).prop("checked", true);
                }
            });
            var accidentCause=data.cxyy;//出现原因
            if(accidentCause=="碰撞"){
                accidentCause=="1";
            }
            $("#accidentCause option[value='"+accidentCause+"']").prop("selected",true);
            var accidentDuty=data.sgze;//事故责任
            if(accidentDuty=="全责"){
                accidentDuty="1";
            }else if(accidentDuty=="主责"){
                accidentDuty="2";
            }else if(accidentDuty=="次责"){
                accidentDuty="3";
            }else if(accidentDuty=="无责"){
                accidentDuty="4";
            }else if(accidentDuty=="无法确认责任"){
                accidentDuty="5";
            }else{
                accidentDuty="0";

            }

            $("#accidentDuty option[value='"+accidentDuty+"']").prop("selected",true);
            var sgzebfb=data.sgzebfb;//事故责任百分比；
            $("#accidentDutyPercent").val(sgzebfb);
            var accidentArea=data.cxqy;//出现区域
            if(accidentArea=="市内"){
                accidentArea="1";
            }else if(cxqy=="省内"){
                accidentArea="2";

            }else if(cxqy=="省外"){
                accidentArea="3";

            }else if(cxqy=="境外"){
                accidentArea="4";
            }else{
                accidentArea='';
            }
            console.log(accidentArea);
            $("input[name='accidentArea']").each(function () {
                if ($(this).val() == accidentArea) {
                    $(this).attr("checked", true);
                }
            });
            var sgclbm=data.sgclbm;//事故处理部门
            if(sgclbm=="交警一般处理非互碰自陪案件"){
                sgclbm="1";
            }else{
                sgclbm="";
            }
            $("#accidentHandleDept option[value='"+sgclbm+"']").prop("selected",true);
            var qtsgclbm=data.qtsgclbm;//其他事故处理部门
            $("#otherAccidentHandleDept option[value='"+qtsgclbm+"']").prop("selected",true);
            var roadInfo=data.dlxx;//道路信息
            if(roadInfo=="高速公路"){
                roadInfo="1";

            }else if(roadInfo=="普通公路"){
                roadInfo="2";
            }else if(roadInfo=="市区道路"){
                roadInfo="3";
            }else if(roadInfo=="乡村公路"){
                roadInfo="4";
            }else if(roadInfo=="庭院车场"){
                roadInfo="5";
            }else{
                roadInfo="6";
            }
            $("input[name='roadInfo']").each(function () {
                if ($(this).val() == roadInfo) {
                    $(this).prop("checked", true);
                }
            });
            var isInjuriesDeaths=data.sfyrs//是否有人伤
            if(isInjuriesDeaths=="是"){
                isInjuriesDeaths='1';
            }else{
                isInjuriesDeaths='0';
            }
            $("input[name='isInjuriesDeaths']").each(function(){
                if($(this).val()==isInjuriesDeaths){
                    $(this).prop("checked",true);
                }
            });
            var threeInjuries=data.szrs;//三者人伤
            $("#threeInjuries").val(threeInjuries);
            var threeDeaths=data.szrswang;//三者人死亡
            $("#threeDeaths").val(threeDeaths);
            var selfCarInjuries=data.bcrs;//本车人伤
            var selfCarDeaths=data.bcrswang;//本车人死亡
            console.log(selfCarInjuries+","+selfCarDeaths);
            $("#selfCarInjuries").val(selfCarInjuries);
            $("#selfCarDeaths").val(selfCarDeaths);
            var accidentType=data.sglx;//事故类型
            if(accidentType=="严重"){
                accidentType="1";
            }else{
                accidentType="2";
            }
            $("#accidentType option[value='"+accidentType+"']").prop("selected",true);
            var accidentDesc=data.cxjg;//出险经过
            $("#accidentDesc").val(accidentDesc);
            var hitPart=data.bzbw;//碰撞部位
            var claimFee=data.lpfy;//理赔费用
            $("#claimFee").val(claimFee);
            var isRescue=data.sfsj;//是否需要施救
            if(isRescue=="是"){
                isRescue="1";
            }else{
                isRescue="0";
            }
            $("input[name='isRescue']").each(function(){
                if($(this).val()==isRescue){
                    $(this).prop("checked",true);
                }
            });
            var  involveThreeCars=data.sgsjszcsl;//事故涉及车辆
            $("#involveThreeCars").val(involveThreeCars);
            var isDutyDeathAccident=data.sfyzswsg;//是否有责死亡
            if(isDutyDeathAccident=="是"){
                isDutyDeathAccident="1";
            }else{
                isDutyDeathAccident="0";
            }
            $("input[name='isDutyDeathAccident']").each(function(){
                if($(this).val()==isDutyDeathAccident){
                    $(this).prop("checked",true);
                }
            });
            var isRoadTrafficAccident=data.sfdljtsg;//是否道路交通事故
            if(isRoadTrafficAccident=="是"){
                isRoadTrafficAccident="1";
            }else{
                isRoadTrafficAccident="0";
            }
            $("input[name='isRoadTrafficAccident']").each(function(){
                if($(this).val()==isRoadTrafficAccident){
                    $(this).prop("checked",true);
                }
            });
            var isMajorClaims=data.zdpabs;//重大赔案
            if(isMajorClaims=="是"){
                isMajorClaims="1";
            }else{
                isMajorClaims="0";
            }
            $("input[name='isMajorClaims']").each(function(){
                if($(this).val()==isMajorClaims){
                    $(this).prop("checked",true);
                }
            });
            var hasTrafficAccidentBook=data.ywjgsgs;//有无交管事故书
            if(hasTrafficAccidentBook=="是"){
                hasTrafficAccidentBook="1";
            }else{
                hasTrafficAccidentBook="0";
            }
            $("input[name='hasTrafficAccidentBook']").each(function () {
                if ($(this).val() == hasTrafficAccidentBook) {
                    $(this).attr("checked", true);
                }
            });
            var selfCom=data.hpzpajbs;//互碰自陪案件标识
            if(selfCom=="是"){
                selfCom="1";
            }else{
                selfCom="0";
            }
            $("input[name='selfCom']").each(function () {
                if ($(this).val() == selfCom) {
                    $(this).attr("checked", true);
                }
            });
            var estimateCase=data.yjaj;//预估案件
            if(estimateCase=="是"){
                estimateCase="1";
            }else{
                estimateCase="0";
            }
            $("input[name='estimateCase']").each(function () {
                if ($(this).val() == estimateCase) {
                    $(this).attr("checked", true);
                }
            });
            var rejectionCase=data.jpaj;////拒赔案件
            if(rejectionCase=="是"){
                rejectionCase="1";
            }else{
                rejectionCase="0";
            }

            $("input[name='rejectionCase']").each(function () {
                if ($(this).val() == rejectionCase) {
                    $(this).attr("checked", true);
                }
            });
            var qclx=data.qclx;//求偿类型
            var inspectGroup=data.ckjg;//查勘机构
            $("#inspectGroup").val(inspectGroup);
            var inspectDate=data.cksj;///查勘时间
            $("#inspectDate").val(inspectDate);
            var inspectPalce=data.ckdd;////查勘地点
            $("#inspectPalce").val(inspectPalce);
            var inspectDesc=data.chakanjielun;////查勘结论
            $("#inspectDesc").val(inspectDesc);










        })

    }

        function getSurvey(){
        var caseId=$("#caseIdHiden").val();
        $.post("survey/get",{"caseId":caseId},function (data) {
            if(data!="") {
                $("#idHidden").val(data.id);
                $("#taskStatus option[value='" + data.taskStatus + "']").attr("selected", "selected");
                var d = new Date(data.accidentTime);
                var times = d.getFullYear() + '-' + (d.getMonth() + 1) + '-' + d.getDate() + ' ' + d.getHours() + ':' + d.getMinutes() + ':' + d.getSeconds();
                $("#accidentTime").val(times);
                $("#caseReportTime").val(data.caseReportTime);
                $("#recognizee").val(data.recognizee);
                $("#licenceNo").val(data.licenceNo);
                $("#driver").val(data.driver);

                $("input[name='factDriverSex']").each(function () {
                    if ($(this).val() == data.factDriverSex) {
                        $(this).attr("checked", true);
                    }
                });
                $("#factDriverIdCard").val(data.factDriverIdCard);
                $("#factDriverAbleCarModel option[value='" + data.factDriverAbleCarModel + "']").attr("selected", "selected");
                $("input[name='isSpecialDriver']").each(function () {
                    if ($(this).val() == data.isSpecialDriver) {
                        $(this).attr("checked", true);
                    }
                });
                $("#accidentCause option[value='" + data.accidentCause + "']").attr("selected", "selected");
                $("#accidentDuty option[value='" + data.accidentDuty + "']").attr("selected", "selected");
                $("input[name='accidentArea']").each(function () {
                    if ($(this).val() == data.accidentArea) {
                        $(this).attr("checked", true);
                    }
                });
                $("#accidentHandleDept option[value='" + data.accidentHandleDept + "']").attr("selected", "selected");
                $("#otherAccidentHandleDept option[value='" + data.otherAccidentHandleDept + "']").attr("selected", "selected");
                $("input[name='roadInfo']").each(function () {
                    if ($(this).val() == data.roadInfo) {
                        $(this).attr("checked", true);
                    }
                });

                $("input[name='isInjuriesDeaths']").each(function () {
                    if ($(this).val() == data.isInjuriesDeaths) {
                        $(this).attr("checked", true);
                    }
                });
                $("#threeInjuries").val(data.threeInjuries);
                $("#threeDeaths").val(data.threeDeaths);
                $("#selfCarInjuries").val(data.selfCarInjuries);
                $("#selfCarDeaths").val(data.selfCarDeaths);
                $("#accidentType option[value='" + data.accidentType + "']").attr("selected", "selected");
                $("#accidentDesc").val(data.accidentDesc);
                $("#claimFee").val(data.claimFee);
                $("input[name='isRescue']").each(function () {
                    if ($(this).val() == data.isRescue) {
                        $(this).attr("checked", true);
                    }
                });
                $("#involveThreeCars").val(data.involveThreeCars);

                $("input[name='isDutyDeathAccident']").each(function () {
                    if ($(this).val() == data.isDutyDeathAccident) {
                        $(this).attr("checked", true);
                    }
                });
                $("input[name='isRoadTrafficAccident']").each(function () {
                    if ($(this).val() == data.isRoadTrafficAccident) {
                        $(this).attr("checked", true);
                    }
                });
                $("input[name='isMajorClaims']").each(function () {
                    if ($(this).val() == data.isMajorClaims) {
                        $(this).attr("checked", true);
                    }
                });
                $("input[name='hasTrafficAccidentBook']").each(function () {
                    if ($(this).val() == data.hasTrafficAccidentBook) {
                        $(this).attr("checked", true);
                    }
                });
                $("input[name='isSplitCase']").each(function () {
                    if ($(this).val() == data.isSplitCase) {
                        $(this).attr("checked", true);
                    }
                });
                $("input[name='selfCom']").each(function () {
                    if ($(this).val() == data.selfCom) {
                        $(this).attr("checked", true);
                    }
                });
                $("input[name='estimateCase']").each(function () {
                    if ($(this).val() == data.estimateCase) {
                        $(this).attr("checked", true);
                    }
                });
                $("input[name='rejectionCase']").each(function () {
                    if ($(this).val() == data.rejectionCase) {
                        $(this).attr("checked", true);
                    }
                });
            }else{
                $("#idHidden").remove();
            }
        })


    }
    function viewHtmlHeight(){
        $(".container-fluid").height(100);
    }
    $(function(){
        resizeHtml();
        viewHtmlHeight();
        getSurvey();
        getInvestigation(taskId);
        getfiexedLossTask();
        findHumanInjuryInfo(taskId)

// 1、window.parent.document.getElementById();这个是获取父页面document中的对象；
// 2、window.parent.xxxx();获取父页面js中的方法：xxxx()；
       /* var s=window.parent.text("sss"); //可以用
        alert(s);*/
        $("#distpicker").distpicker({
            province: "江苏省",
            city: "南京市",
            district: "六合区"
        });
        $("#distpickerAccident").distpicker({
            province: "江苏省",
            city: "南京市",
            district: "玄武区"
        });
        $('#accidentTime').datetimepicker({
            "format": 'yyyy-mm-dd hh:ii:ss'
            ,"language":"zh-CN",
            weekStart: 1, //一周从哪一天开始
            todayBtn:  "linked",
            autoclose: 1,
            todayHighlight: 1,
            startView: 2,
            forceParse: 0,
            showMeridian: 1
            // ,"startDate":"2018-01-01"
            ,initialDate: new Date()
        });
        $('#caseReportTime').datetimepicker({
            "format": 'yyyy-mm-dd hh:ii:ss'
            ,"language":"zh-CN",
            weekStart: 1, //一周从哪一天开始
            todayBtn:  "linked",
            autoclose: 1,
            todayHighlight: 1,
            startView: 2,
            forceParse: 0,
            showMeridian: 1
            // ,"startDate":"2018-01-01"
            ,initialDate: new Date()
        });
        formValidator();
    });

    //获取案件编号
    function getMaxCaseNo() {
        var caseNo="";
        $.ajax({
            url:"caseNO/findMaxNo",
            dataType:"json",
            type:"get",
            data:{flag:"101"},
            async: false,
            success:function (data) {
                caseNo= data.data;
            },error: function(XMLHttpRequest, textStatus, errorThrown) {
                alert("error")
            }});

        return caseNo;
    }
    //获取随机的任务编号
    function getTaskNo() {
        var caseNo="";
        $.ajax({
            url:"claimTaskRelation/getTaskNo",
            dataType:"json",
            type:"get",
            /*data:{flag:"101"},*/
            async: false,
            success:function (data) {
                caseNo= data.data;
            },error: function(XMLHttpRequest, textStatus, errorThrown) {
                alert("error")
            }});

        return caseNo;
    }
    //为了兼容ie
    function iframeIsLoad(iframe,callback){
        if(iframe.attachEvent) {
            iframe.attachEvent('onload',function(){
                callback && callback();
            });
        }else {
            iframe.onload = function(){
                callback && callback();
            }
        }
    }
    //点击任务号编辑定损内容
    function localCarEdit(val,flag) {

        if(flag==1){//本车
            $("#localCarIframe").attr("src","claim_add");
            $('#localCar').modal({ show: true});
            var child= document.getElementById("localCarIframe");
            var childWindow = $("#localCarIframe")[0];
            var taskNo=$(val).text();
            var datas=new Array();
            datas.push(taskId);

            iframeIsLoad(childWindow,function(){
                childWindow.contentWindow.getParentData2(taskNo,datas);   // 打印出 我是子页面
            });


        }else if(flag==2){//三责
            $("#threeFixedLossIframe").attr("src","three_fixed_loss_add");
            $('#threeFixedLoss').modal({ show: true});
            var childWindow = $("#threeFixedLossIframe")[0];
            var taskNo=$(val).text();
            var datas=new Array();
            datas.push(taskId);

            iframeIsLoad(childWindow,function(){
                childWindow.contentWindow.getParentData2(taskNo,taskId);   // 打印出 我是子页面
            });

        }else if(flag==3){//物损
            $("#financeFixedLossIframe").attr("src","finance_fixed_loss_add");
            $('#financeFixedLoss').modal({ show: true});
            var childWindow = $("#financeFixedLossIframe")[0];
            var taskNo=$(val).text();
            var datas=new Array();
            datas.push(taskId);
            iframeIsLoad(childWindow,function(){
                childWindow.contentWindow.getParentData2(taskNo,taskId);   // 打印出 我是子页面
            });
        }else if(flag==4){//人伤预估
            $("#humanFixedLossIframe").attr("src","human_fixed_loss_add");
            $('#humanFixedLoss').modal({ show: true});
            var childWindow = $("#humanFixedLossIframe")[0];
            var taskNo=$(val).text();
            var datas=new Array();
            datas.push(taskId);
            iframeIsLoad(childWindow,function(){
                childWindow.contentWindow.getParentData2(taskNo,taskId);   // 打印出 我是子页面
            });
        }

    }
    //删除当前行
    function deletetr(tr){
        $(tr).parent().parent().remove();
    }
    //本车、三者、物损添加项目
    function addItems(val,flag,ids,dsuserid,renwuNo,dingsunzonge,hejiazonge,state,type,hejiayijian) {

        if(renwuNo==''||typeof renwuNo=='undefined'){
            renwuNo=getTaskNo();//获取随机任务编号
        }
        if(typeof (ids)=='undefined'){
            ids=0;
        }
        if(typeof dsuserid=='undefined'){
            dsuserid=0;
        }
        if(typeof (dingsunzonge)=='undefined'){
            dingsunzonge='0.0';

        }
        if(typeof hejiazonge=='undefined'){
            hejiazonge='0.0';

        }
        //state
        if(typeof state=='undefined'){
            state='未进行';
        }else if(state=='0'){
            state='未进行';
        }else if(state=='1'){
            state='进行中';
        }else if(state=='2'){
            state='核价中';
        }else if(state=='3'){
            state='已完成';
        }
        //hejiayijian
        if(typeof hejiayijian=='undefined'||hejiayijian==null){
            hejiayijian='';
        }

        var str="<tr>\n" +
            "                                        <td>\n" +
            "                                            <label><input type=\"checkbox\"/></label>\n" +
            "                                            <label style='display:none'><input  value='"+ids+"'/></label>\n" +
            "                                        </td>\n" +
            "                                        <td>"+dsuserid+"</td>\n";
        if(flag==1){
            str+=   "                                        <td class=\"text-center\"><label data-toggle=\"modal\"  onclick='localCarEdit(this,1);' class=\" btn-info btn-mini\">"+renwuNo+"</label></td>\n" ;
        }else if(flag==2){
            str+=   "                                        <td class=\"text-center\"><label data-toggle=\"modal\"  onclick='localCarEdit(this,2);' class=\" btn-info btn-mini\">"+renwuNo+"</label></td>\n" ;

        }else if(flag==3){
            str+=   "                                        <td class=\"text-center\"><label data-toggle=\"modal\"  onclick='localCarEdit(this,3);' class=\" btn-info btn-mini\">"+renwuNo+"</label></td>\n" ;
        }else{
            str+=   "                                        <td class=‘text-center’>生成任务号失败</td>" ;

        }


        str+="                                        <td>"+dingsunzonge+"</td>\n" +
            "                                        <td>"+hejiazonge+"</td>\n" +
            "                                        <td>"+hejiayijian+"</td>\n" +

            "                                        <td>"+state+"</td>\n" +
            "                                        <td style=\"text-align: center\">\n" +
            "                                            <span class=\"glyphicon glyphicon-remove-sign \" onclick=\"deletetr(this);\"></span>\n" +
            "                                        </td>\n" +
            "                                    </tr>";
        if(typeof type!="undefined"){
            if(type==0){
                $("#tr_localCarAdd").before(str);
            }else if(type==1){
                $("#thridPartFixedLossAdd").before(str);
            }else if(type==2){
                $("#goodsFiexdLossAdd").before(str);
            }
        }else{
            $(val).parent().parent().before(str);
        }


    }
    /*添加人伤行信息*/
    function humanInjuryInfoAddTr(xm,xb,nl,hj,jtzt,zlfs,jzyy,dszonge,hszonge,state,taskNo){
        if(xm==null){
            xm="";
        }
        if(xb==null){
            xb="";
        }
        if(nl==null){
            nl="";
        }
        if(hj==null){
            hj="";
        }
        if(jtzt==null){
            jtzt="";
        }
        if(zlfs==null){
            zlfs="";
        }
        if(zlfs==null){
            zlfs="";
        }
        if(dszonge==null){
            dszonge="";
        }
        if(jzyy==null){
            jzyy="";
        }
        if(state==0){
            state="未进行";
        }else if(state==1){
            state="进行中";
        }else if(state==2){
            state="核价中";
        }else if(state==3){
            state="已完成";
        }
        var str="<tr>\n" +
            "                                            <td class=\"text-center\"><label data-toggle=\"modal\"  onclick=\"localCarEdit(this,4);\" class=\" btn-info btn-mini\">"+taskNo+"</label></td>\n" +
            "                                            <td><labe>"+xm+"</labe></td>\n" +
            "                                            <td><labe>"+xb+"</labe></td>\n" +
            "                                            <td><labe>"+nl+"</labe></td>\n" +
            "                                            <td><labe>"+hj+"</labe></td>\n" +
            "                                            <td><labe>"+jtzt+"</labe></td>\n" +
            "                                            <td><labe>"+zlfs+"</labe></td>\n" +
            "                                            <td><labe>"+jzyy+"</labe></td>\n" +
            "                                            <td><labe>"+dszonge+"</labe></td>\n" +
            "                                            <td><labe>"+hszonge+"</labe></td>\n" +
            "                                            <td><labe>"+state+"</labe></td>\n" +
            "                                            <td style=\"text-align: center\">\n" +
            "                                                <span class=\"glyphicon glyphicon-remove-sign \" onclick=\"deletetr(this);\"></span>\n" +
            "                                                <span class='glyphicon glyphicon-pencil' onclick='localCarEdit(this,4)'></span>\n" +
            "                                            </td>\n" +
            "                                        </tr>";
        $("#tr_humanFixedLossAdd").before(str);

    }
    /*添加humanFixedLossAdd*/
    function humanFixedLossAdd(val){
        var str="<tr>\n" +
            "                                            <td class=\"text-center\"><label data-toggle=\"modal\"  onclick=\"localCarEdit(this,4);\" class=\" btn-info btn-mini\">黄忠</label></td>\n" +
            "                                            <td>--</td>\n" +
            "                                            <td>--</td>\n" +
            "                                            <td>--</td>\n" +
            "                                            <td>--</td>\n" +
            "                                            <td>--</td>\n" +
            "                                            <td>--</td>\n" +
            "                                            <td>--</td>\n" +
            "                                            <td>--</td>\n" +
            "                                            <td>--</td>\n" +
            "                                            <td>--</td>\n" +
            "                                            <td style=\"text-align: center\">\n" +
            "                                                <span class=\"glyphicon glyphicon-remove-sign \" onclick=\"deletetr(this);\"></span>\n" +
            "                                                <span class='glyphicon glyphicon-pencil' onclick='localCarEdit(this,4)'></span>\n" +
            "                                            </td>\n" +
            "                                        </tr>";
        $(val).parent().parent().before(str);


    }

    function saveSurveyInfo(){
        //保存勘查信息
        var myform=$("#surveyFormInfo");
        var url=myform.attr("action");
        myform.data('bootstrapValidator').validate();
        if ($("#surveyFormInfo").data('bootstrapValidator').isValid()) {//获取验证结果，如果成功，执行下面代码
            //清楚验证规则
            $("#surveyFormInfo").data('bootstrapValidator').destroy();
            $("#surveyFormInfo").data('bootstrapValidator',null);
            $.post(url,$("#surveyFormInfo").serialize(),function(data){
               // alert(data.msg);
                if(data.result){
                    $("#saveSurveyInfoBtn").attr("disabled",true);
                    $("#saveSurveyInfoBtn").removeClass("btn-info");
                }
            });
        }else{
            alert("信息未填写完整");
        }
    }
    //初始化表单
    function formValidator(){
        $("#surveyFormInfo").bootstrapValidator(
            {
                live:"enabled",/*验证时机，enabled是内容有变化就验证（默认），disabled和submitted是提交再验证*/
                message:"通用的验证失败信息",
                feedbackIcons:{//根据验证结果显示的各种图标
                    valid: 'glyphicon glyphicon-ok',
                    invalid: 'glyphicon glyphicon-remove',
                    validating: 'glyphicon glyphicon-refresh'
                },
                fields: {
                    taskStatus:{
                        message: ' ',
                        validators: {
                            notEmpty: {
                                message: ''
                            }
                        }
                    },
                    claimFee: {
                        message: '费用验证失败',
                        validators: {
                            notEmpty: {
                                message: '费用不能为空'
                            }
                            ,numeric:{
                                message:'价格错误'
                            }
                            ,lessThan: {
                                message:' ',
                                value: 10000000000
                            }

                        }
                    }
                    // ,caseReportTime:{
                    //     message:'添加时间失败',
                    //     trigger:'change',
                    //     validators:{
                    //         notEmpty:{
                    //             message:'不能为空'
                    //         }
                    //         ,stringLength: {
                    //             min: 10,
                    //             // max: 18,
                    //             message: '不能为空'
                    //         }
                    //         ,date:{
                    //             format : 'YYYY-MM-DD HH:mm:ss',
                    //             message : '日期格式不正确'
                    //         }
                    //
                    //     }
                    //
                    // }
                    ,accidentTime:{

                        message:'添加失败',
                        trigger:'change',
                        validators:{
                            notEmpty:{
                                message:'不能为空'
                            }
                            ,date:{
                                format : 'YYYY-MM-DD HH:mm:ss',
                                message : '日期格式不正确'
                            }

                        }
                    }
                    ,factDriverAbleCarModel:{
                        message:'驾驶车型错误',
                        validators:{
                            notEmpty:{
                                message:'请选择'
                            }
                        }

                    }
                    ,factDriverIdCard:{
                        message:'证件号错误',
                        validators:{
                            notEmpty:{
                                message:'必填'
                            }
                            ,regexp: {
                                regexp: /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/,
                                message: '格式错误，为15位和18位！'
                            },
                            callback: {/*自定义，可以在这里与其他输入项联动校验*/
                                message: '身份证号码无效！',
                                callback:function(value, validator,$field){
                                    //15位和18位身份证号码的正则表达式
                                    var regIdCard = /^(^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$)|(^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])((\d{4})|\d{3}[Xx])$)$/;
                                    //如果通过该验证，说明身份证格式正确，但准确性还需计算
                                    var idCard = value;
                                    if (regIdCard.test(idCard)) {
                                        if (idCard.length == 18) {
                                            var idCardWi = new Array(7, 9, 10, 5, 8, 4, 2, 1, 6, 3, 7, 9, 10, 5, 8, 4, 2); //将前17位加权因子保存在数组里
                                            var idCardY = new Array(1, 0, 10, 9, 8, 7, 6, 5, 4, 3, 2); //这是除以11后，可能产生的11位余数、验证码，也保存成数组
                                            var idCardWiSum = 0; //用来保存前17位各自乖以加权因子后的总和
                                            for (var i = 0; i < 17; i++) {
                                                idCardWiSum += idCard.substring(i, i + 1) * idCardWi[i];
                                            }
                                            var idCardMod = idCardWiSum % 11;//计算出校验码所在数组的位置
                                            var idCardLast = idCard.substring(17);//得到最后一位身份证号码
                                            //如果等于2，则说明校验码是10，身份证号码最后一位应该是X
                                            if (idCardMod == 2) {
                                                if (idCardLast == "X" || idCardLast == "x") {
                                                    return true;
                                                    //alert("恭喜通过验证啦！");
                                                } else {
                                                    return false;
                                                    //alert("身份证号码错误！");
                                                }
                                            } else {
                                                //用计算出的验证码与最后一位身份证号码匹配，如果一致，说明通过，否则是无效的身份证号码
                                                if (idCardLast == idCardY[idCardMod]) {
                                                    //alert("恭喜通过验证啦！");
                                                    return true;
                                                } else {
                                                    return false;
                                                    //alert("身份证号码错误！");
                                                }
                                            }
                                        }
                                    } else {
                                        //alert("身份证格式不正确!");
                                        return false;
                                    }
                                }
                            }
                        }
                    },
                    accidentCause:{
                        message:'驾驶车型错误',
                        validators:{
                            notEmpty:{
                                message:'请选择'
                            }
                        }
                    }
                    ,accidentDuty:{
                        message:' ',
                        validators:{
                            notEmpty:{
                                message:''
                            }
                        }

                    }
                    ,involveThreeCars:{
                        message:' ',
                        validators:{
                            digits: {
                                message: '该值只能包含数字。'
                            }
                            ,lessThan: {
                                message:' ',
                                value: 999
                            }
                        }

                    }
                }
            })

    }

</script>
<body>
    <div class="allContent" style="max-height:600px;overflow-y:auto;">
        <div class="row">
            <div class="col-md-12 col-sm-12 col-xs-12">
                <!--<div class="modal-body" style="height:450px;overflow:auto; ">-->
                    <!--保单列表开始-->
                <div id="insureInfo">
                        <!--标题-->
                        <div>
                            <div class="modelTitle">关联保单列表</div>
                        </div>
                        <!--表格项开始-->
                        <div id="insureTable">
                            <table class="table table-bordered table-condensed">
                                <thead>
                                <tr>
                                    <th>险种</th>
                                    <th>保单</th>
                                    <th>被保险人</th>
                                    <th>品牌类型</th>
                                    <th>车牌号</th>
                                    <th>保险到期日期</th>
                                    <th>出现次数</th>
                                    <th>保费</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr>
                                    <td >交强险</td>
                                    <td id="bizNo"class=""></td>
                                    <td class="beibaoxianren"></td>
                                    <td class="modleName"></td>
                                    <td class="licenceNo"></td>
                                    <td id="forceExpireDate" class=""></td>
                                    <td id="bizCount"></td>
                                    <td id="bizMoney"></td>
                                </tr>
                                <tr>
                                    <td >交强险</td>
                                    <td id="forceNo"></td>
                                    <td class="beibaoxianren">/td>
                                    <td class="modleName"></td>
                                    <td class="licenceNo"></td>
                                    <td id="businessExpireDate" class=""></td>
                                    <td id="businessCount" class=""></td>
                                    <td id="businessMoney" class=""></td>
                                </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <!--保单列表结束-->

                    <!--查看信息开始-->
                <div id="survey">
                        <!--标题-->
                        <div>
                            <div class="modelTitle">查勘信息</div>
                        </div>
                        <div id="surveyForm" class="surveyForm">
                            <form class="form-inline" role="form" action="survey/saveOrUpdate" id="surveyFormInfo" method="post" >

                                <div class="" id="hiddenArea">
                                    <label style="display: none;" class="form-group">
                                        <input value="" class="form-control" id="caseIdHiden" name="caseId" style="">
                                    </label>
                                    <label style="display: none;" class="form-group">
                                        <input value="" class="form-control" id="idHidden" name="id" style="">
                                    </label>
                                </div>
                                <table class="table table-bordered table-condensed">
                                    <tbody>
                                    <tr >
                                        <td class="text-right">任务状态:</td>
                                        <td >
                                            <label class="form-group selectContainer">
                                                <select name="taskStatus" id="taskStatus" class="select-form-control " style="font-size: 10px; width:100px;">
                                                    <option value="">--请选择--</option>
                                                    <option value="0">添加中</option>
                                                    <option value="1">处理中(定损)</option>
                                                    <option value="2">未赔付(核审)</option>
                                                    <option value="3">已赔付</option>
                                                    <option value="4">已取消</option>
                                                    <option value="5"> 驳回(处理中)</option>

                                                </select>
                                            </label>
                                        </td>
                                        <td class="text-right">出险时间:</td>
                                        <td>
                                            <lable class="form-group my-form-control">
                                                <input class="form-control" style="width:190px;height: 20px;" name="accidentTime" id="accidentTime" />
                                            </lable>
                                        </td>
                                        <td class="text-right">报案时间:</td>
                                        <td>
                                            <label class="form-group my-form-control">
                                                <input class="form-control" style="width:180px;height: 20px;" name="caseReportTime" id="caseReportTime" />
                                            </label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="text-right">报案号:</td>
                                        <td>
                                            <label class="form-group">
                                                <input style="width:200px;height:20px;" name="caseNo" id="caseNo" class="form-control" value="" />
                                            </label>
                                        </td>
                                        <td class="text-right">被保险人:</td>
                                        <td>
                                            <label class="form-group">
                                                <input style="width:180px;height: 20px;" class="form-control" name="recognizee" id="recognizee"/>
                                            </label>
                                        </td>
                                        <td class="text-right">车牌号:</td>
                                        <td>
                                            <label class="form-group">
                                                <input class="form-control" style="width:180px;height: 20px;" name="licenceNo" id="licenceNo"/>
                                            </label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="text-right">驾驶员:</td>
                                        <td>
                                            <label class="form-group"><input style="width:120px;height: 20px;" class="form-control" name="driver" id="driver" value=""/>
                                            </label></td>
                                        <td class="text-right">实际驾驶员人:</td>
                                        <td>
                                            <label class="form-group">
                                                <input style="width:180px;height: 20px;" class="form-control" name="factDriver" id="factDriver"/>
                                            </label></td>
                                        <td class="text-right">驾驶员性别:</td>
                                        <td>
                                            <label class="radio">
                                                <input type="radio" name="factDriverSex" id="radiosBoy" value="0"  checked>男
                                                <input type="radio" name="factDriverSex" id="radiosGirl" value="1">女
                                            </label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="text-right">准驾车型:</td>
                                        <td >
                                            <label class="form-group " >
                                                <select name="factDriverAbleCarModel" id="factDriverAbleCarModel" class="select-form-control" style="height: 20px;">
                                                    <option value="">-请选择-</option>
                                                    <option value="01">01-小型汽车号牌</option>
                                                    <option value="02">02-大型货车号牌</option>
                                                    <option value="03">03-中型客车号牌</option>
                                                    <option value="04">04-城市公交车号牌</option>
                                                    <option value="05">05-牵引车号牌</option>
                                                    <option value="06">06-大型客车号牌</option>
                                                    <option value="07">07-小型自动挡汽车号牌</option>
                                                    <option value="08">08-低速载货汽车号牌</option>
                                                    <option value="09">09-三轮汽车号牌</option>
                                                    <option value="10">10-普通三轮摩托车号牌</option>
                                                    <option value="11">11-普通二轮摩托车号牌</option>
                                                    <option value="12">12-轻便摩托车号牌</option>
                                                    <option value="13">13-轮式机动自行机械车号牌</option>
                                                    <option value="14">14-无轨电车号牌</option>
                                                    <option value="15">15-有轨电车号牌</option>
                                                </select>
                                            </label>
                                        </td>
                                        <td class="text-right">证件号码:</td>
                                        <td>
                                            <label class="form-group">
                                                <input style="width:200px;height:20px;" name="factDriverIdCard" class="form-control" id="factDriverIdCard"/>
                                            </label>
                                        </td>
                                        <td class="text-right">是否指定驾驶员:</td>
                                        <td>
                                            <label class="radio">
                                                <input type="radio" name="isSpecialDriver" id="noSureDriver" value="0" >是
                                            </label>
                                            <label class="radio">
                                                <input type="radio" name="isSpecialDriver" id="yesSureDriver" value="1" checked>否
                                            </label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="text-right">出险原因:</td>
                                        <td colspan="3" >
                                            <label class="form-group">
                                                <select name="accidentCause"  value=""  id="accidentCause" class="select-form-control">
                                                    <option value="">-请选择-</option>
                                                    <option value="1">碰撞</option>
                                                </select>
                                            </label>
                                            <!--<label class="form-group">-->
                                            <!--<select name="accidentCause2"  class="my-form-control">-->
                                            <!--<option value="">-请选择-</option>-->
                                            <!--<option value="1">多车碰撞</option>-->
                                            <!--</select>-->
                                            <!--</label>-->
                                        </td>
                                        <td class="text-right">事故责任:</td>
                                        <td >
                                            <label class="form-group">
                                                <select name="accidentDuty" id="accidentDuty" class="select-form-control">
                                                    <option value="">-请选择-</option>
                                                    <option value="1">全责</option>
                                                    <option value="2">主责</option>
                                                    <option value="3">次责</option>
                                                    <option value="4">无责</option>
                                                    <option value="5">无法确认责任</option>
                                                </select>
                                            </label>
                                            <label>
                                                <input style="width:50px;height:20px;margin-left:10px;" value="" name="accidentDutyPercent" id="accidentDutyPercent"/>%
                                            </label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="text-right">出险区域:</td>
                                        <td>
                                            <label class="radio">
                                                <input type="radio" name="accidentArea" id="insureCity" value="0" checked>市内
                                            </label>
                                            <label class="radio">
                                                <input type="radio" name="accidentArea" id="insurePrience" value="1">省内
                                            </label>
                                            <label class="radio">
                                                <input type="radio" name="accidentArea" id="insurePrienceOut" value="2">省外
                                            </label>
                                            <label class="radio">
                                                <input type="radio" name="accidentArea" id="areaOut" value="3">境外
                                            </label>
                                        </td>
                                        <td class="text-right">事故处理部门:</td>
                                        <td >
                                            <label class="form-group">
                                                <select name="accidentHandleDept" id="accidentHandleDept">
                                                    <option value="">-请选择-</option>
                                                    <option value="1">交警一般程序处理非碰自赔案件</option>
                                                    <option value="2">交警一般程序处理碰自赔案件</option>
                                                </select>
                                            </label>
                                        </td>
                                        <td class="text-right">其他事故处理部门:</td>
                                        <td >
                                            <label class="form-group">
                                                <select name="otherAccidentHandleDept" id="otherAccidentHandleDept">
                                                    <option value="">-请选择-</option>
                                                    <option value="1">交警一般程序处理非碰自赔案件</option>
                                                </select>
                                            </label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="text-right" >道路信息</td>
                                        <td colspan="3" class="form-group">
                                            <label class="radio">
                                                <input type="radio" name="roadInfo" id="motorway" value="0" checked>高速公路
                                            </label>
                                            <label class="radio">
                                                <input type="radio" name="roadInfo" id="trafficway" value="1">普通公路
                                            </label>
                                            <label class="radio">
                                                <input type="radio" name="roadInfo" id="cityRoad" value="2">市区道路
                                            </label>
                                            <label class="radio">
                                                <input type="radio" name="roadInfo" id="countryRoad" value="3">乡村公路
                                            </label>
                                            <label class="radio">
                                                <input type="radio" name="roadInfo" id="housePark" value="4">庭院车场
                                            </label>
                                            <label class="radio">
                                                <input type="radio" name="roadInfo" id="otherArea" value="5">其他
                                            </label>
                                        </td>
                                        <td class="text-right" >是否有人伤</td>
                                        <td>
                                            <label class="radio form-group">
                                                <input type="radio" name="isInjuriesDeaths" id="yesHumanInjury" value="1">是
                                                <input type="radio" name="isInjuriesDeaths" id="noHumanInjury" value="0" checked>否
                                            </label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="text-right" >三者人伤</td>
                                        <td>
                                            <label>伤</label>
                                            <label class="form-group">
                                                <input name="threeInjuries" id="threeInjuries" value="0" style="width:30px;" class="width30"/>
                                            </label>
                                            <label>亡</label>
                                            <label class="form-group">
                                                <input name="threeDeaths" id="threeDeaths" value="0" style="width:30px;"class="width30"/>
                                            </label>
                                        </td>
                                        <td>本车人伤</td>
                                        <td>
                                            <label>伤</label>
                                            <label class="form-group">
                                                <input value="0" id="selfCarInjuries" name="selfCarInjuries"style="width:30px;" class="width30"/>
                                            </label>
                                            <label>亡</label>
                                            <label class="form-group">
                                                <input value="0" name="selfCarDeaths" id="selfCarDeaths" style="width:30px;"class="width30"/>
                                            </label>
                                        </td>
                                        <td class="text-right" >事故类型</td>
                                        <td>
                                            <label class="form-group">
                                                <select name="accidentType" id="accidentType" class="">
                                                    <option value="">-请选择-</option>
                                                    <option value="1">严重</option>
                                                    <option value="2">一般</option>
                                                    <option value="3">无</option>
                                                </select>
                                            </label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="text-right" >出险地点</td>
                                        <td colspan="5">
                                            <div id="distpicker" class="form-inline form-group">
                                                <label for="province">省:</label>
                                                <select name="accidentProvince" id="province" class="form-control input-sm"></select>
                                                <label for="city">市:</label>
                                                <select name="accidentCity" id="city" class="form-control input-sm"></select>
                                                <label for="district">区:</label>
                                                <select name="accidentDistrict" id="district" class="form-control input-sm"></select>
                                                <!--<button type="button" class="btn-default btn-info" name=""> 打开地图</button>-->
                                            </div>

                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="text-right" >事故所在地</td>
                                        <td colspan="5">
                                            <div id="distpickerAccident" class="form-inline form-group">
                                                <label for="province">省:</label>
                                                <select name="accidentProvince2" id="accidentProvince" class="form-control input-sm"></select>
                                                <label for="city">市:</label>
                                                <select name="accidentCity2" id="accidentCity" class="form-control input-sm"></select>
                                                <label for="district">区:</label>
                                                <select name="accidentDistrict2" id="accidentDistrict" class="form-control input-sm"></select>
                                                <!--<button type="button" class="btn-default btn-info" name=""> 打开地图</button>-->
                                            </div>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="text-right" >出险经过</td>
                                        <td colspan="3">
                                            <label class="form-group">
                                                <textarea rows="4" style="min-width: 500px;" name="accidentDesc"  id="accidentDesc" value="" ></textarea>
                                            </label>
                                        </td>
                                        <td class="text-right">碰撞部位</td>
                                        <td>
                                            <img src="./images/hit.png" width="200px;" height="100px;">
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="text-right">理赔费用</td>
                                        <td>
                                            <label class="form-group">
                                                <input class="form-control" name="claimFee"  id="claimFee" style="width: 150px;height: 20px;"/>
                                            </label>
                                        </td>
                                        <td class="text-right">是否需要施救</td>
                                        <td>
                                            <label class="radio form-group">
                                                <input type="radio" name="isRescue" id="yesAssist" value="1" checked>是

                                                <input type="radio" name="isRescue" id="noAssist" value="0">否
                                            </label>

                                        </td>
                                        <td class="text-right">事故涉及三者车数量</td>
                                        <td>
                                            <label class="form-group">
                                                <input class="my-form-control" name="involveThreeCars" id="involveThreeCars" value="0"/>
                                            </label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="text-right">是否有责死亡事故</td>
                                        <td>
                                            <label class="radio form-group" >
                                                <input type="radio" value="0" name="isDutyDeathAccident" checked/> 否
                                                <input type="radio" value="1" name="isDutyDeathAccident"> 是
                                            </label>
                                        </td>
                                        <td class="text-right" >是否道路交通事故</td>
                                        <td>
                                            <label class="radio">
                                                <input type="radio" value="0" name="isRoadTrafficAccident" checked/>否
                                                <input type="radio" value="1" name="isRoadTrafficAccident"/>是
                                            </label>
                                        </td>
                                        <td class="text-right">重大赔案标志</td>
                                        <td>
                                            <label class="radio">
                                                <input type="radio" name="isMajorClaims" id="yesMajorClaims" value="1" checked>是
                                                <input type="radio" name="isMajorClaims" id="noMajorClaims" value="0">否
                                            </label>

                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="text-right" colspan="2"> 有无交管事故书</td>
                                        <td>
                                            <label class="radio form-group">
                                                <input type="radio" name="hasTrafficAccidentBook" id="yesAccidentBook" value="1" checked/>有
                                                <input type="radio" name="hasTrafficAccidentBook" id="noAccidentBook" value="0"/>无
                                            </label>
                                        </td>
                                        <td class="text-right">
                                            是否分单结案
                                        </td>
                                        <td colspan="2">
                                            <label class="radio form-group">
                                                <input type="radio" name="isSplitCase" id="yesSplitCase" value="1" checked/>是
                                                <input type="radio" name="isSplitCase" id="noSplitCase" value="0"/>否
                                            </label>

                                        </td>
                                    </tr>
                                    <tr>
                                        <td class="text-right">互碰自赔案件标识</td>
                                        <td>
                                            <label class="radio form-group">
                                                <input type="radio" name="selfCom" id="yesselfCom" value="1" checked/>是
                                                <input type="radio" name="selfCom" id="noselfCom" value="0"/>否
                                            </label>
                                        </td>
                                        <td class="text-right">预估案件</td>
                                        <td>
                                            <label class="radio form-group">
                                                <input type="radio" name="estimateCase" id="yesEstimateCase" value="1" checked/>是
                                                <input type="radio" name="estimateCase" id="noEstimateCase" value="0"/>否
                                            </label>
                                        </td>
                                        <td class="text-right">拒赔案件</td>
                                        <td>
                                            <label class="radio form-group">
                                                <input type="radio" name="rejectionCase" id="yesRejectionCase" value="1" checked/>是
                                                <input type="radio" name="rejectionCase" id="noRejectionCase" value="0"/>否
                                            </label>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>求偿类型</td>
                                        <td colspan="5">
                                            <label class="form-group">
                                                <select name="requirePayType" id="requirePayType">
                                                    <option value="">-请选择-</option>
                                                    <option value="1">代位求偿</option>
                                                    <option value="2">被代位求偿</option>
                                                </select>
                                            </label>

                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="6">
                                            <table class="table table-bordered">
                                                <thead>
                                                <tr class="tableTrcolor">
                                                    <th>定损险种</th>
                                                    <th>估损金额</th>
                                                    <th>操作</th>
                                                </tr>
                                                </thead>
                                                <tr>
                                                    <td>12</td>
                                                    <td>12</td>
                                                    <td>12</td>
                                                </tr>
                                            </table>
                                            <button type="button" class="bt btn-info" style="width: auto;">增加费用</button>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td colspan="6">
                                            <div>
                                                <label class="form-group">查勘员:<input name="inspector" class="width100"/></label>
                                                <label>查勘机构:<input name="inspectGroup" class="width200" id="inspectGroup"/></label>
                                                <label>查勘时间:<input name="inspectDate" class="width150" id="inspectDate"/></label>
                                                <label>查勘地点:<input name="inspectPalce" class="width150" id="inspectPalce"/></label>
                                            </div>
                                            <div style="">
                                                <label style="width: 6%;">勘察结论:</label>
                                                <label style="width: 93%;"><textarea rows="4" style="min-width: 100%" name="inspectDesc" id="inspectDesc"></textarea></label>
                                            </div>
                                            <div>
                                                <button type="button" class="bt btn-info" style="width: auto;">索赔须知</button>
                                                <button type="button" class="bt btn-info" style="width: auto;">影响资料</button>
                                                <button type="button" class="bt btn-info" style="width: auto;">查勘报告</button>
                                                <button type="button" class="bt btn-info" style="width: auto;">现场草图</button>
                                                <button type="button" class="bt btn-info btn-xs" style="width: auto;">查看报告打印</button>
                                                <button type="button" class="btn-info btn-xs" style="width: auto;">索赔申请书打印</button>
                                                <!--disabled="disabled"--> <!--onclick="saveSurveyInfo();"-->
                                                <button  type="button" class="btn btn-info btn-xs" style="width: auto;float:right;margin-right:10px;"  id="saveSurveyInfoBtn" onclick="saveSurveyInfo();">保存</button>
                                            </div>
                                        </td>
                                    </tr>
                                    </tbody>
                                </table>
                            </form>
                        </div>
                    </div>
                    <!--查看信息结束-->
                    <!--本车定损开始-->
                <div id="selfCarLossAssessment">
                        <!--标题-->
                        <div class="selfCarLossAssessmentTitle">
                            <div class="modelTitle">本车定损</div>
                        </div>
                        <div class="lossContainer">
                            <table class="table table-bordered table-condensed">
                                <thead>
                                <tr >
                                    <th>
                                    </th>
                                    <th> 定损员 </th>
                                    <th> 任务编号</th>
                                    <th> 定损总额 </th>
                                    <th> 核价总额 </th>
                                    <th> 核价意见</th>
                                    <th>任务状态</th>
                                    <th> 操作 </th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr id="tr_localCarAdd">
                                    <td colspan="8">
                                        <button type="button" data-toggle="modal"  id="localCarAdd" class="btn-info btn-mini " style="float: left;" onclick="addItems(this,1);">添加</button>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                            <!--<button type="button" class="button btn-info btn-sm" style="text-align: left;">添加</button>-->

                        </div>

                    </div>
                    <!--本车定损结束-->
                    <!--三责车损定损开始-->
                <div>
                        <!--标题-->
                        <div class="selfCarLossAssessmentTitle">
                            <div class="modelTitle">三责车损定损</div>
                        </div>
                        <div class="lossContainer">
                            <table class="table table-bordered table-condensed">
                                <thead>
                                <tr >
                                    <th>

                                    </th>
                                    <th> 定损员 </th>
                                    <th> 任务编号</th>
                                    <th> 定损总额 </th>
                                    <th> 核价总额 </th>
                                    <th> 核价意见</th>
                                    <th>任务状态</th>
                                    <th> 操作 </th>
                                </tr>
                                </thead>
                                <tbody>

                                <tr id="thridPartFixedLossAdd">
                                    <td colspan="8">
                                        <button type="button" data-toggle="modal"  class="btn-info btn-mini " style="float: left;" onclick="addItems(this,2);">添加</button>
                                        <!--<a data-toggle="modal"  id="threeFixedLossAdd" class="button btn-info btn-sm" style="float: left;">添加</a>-->
                                        <!--<button type="button" class="button btn-info btn-sm" style="float: left;">添加</button>-->
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                            <!--<button type="button" class="button btn-info btn-sm" style="text-align: left;">添加</button>-->

                        </div>

                    </div>
                    <!--三责定损结束-->
                    <!--物损定损开始-->
                <div>
                        <!--标题-->
                        <div class="selfCarLossAssessmentTitle">
                            <div class="modelTitle">物损定损</div>
                        </div>
                        <div class="lossContainer">
                            <table class="table table-bordered table-condensed">
                                <thead>
                                <tr >
                                    <th>

                                    </th>
                                    <th> 定损员</th>
                                    <th> 任务编号</th>
                                    <th> 定损总额</th>
                                    <th> 核价总额</th>
                                    <th> 核价意见</th>
                                    <th>任务状态</th>
                                    <th> 操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                <tr id="goodsFiexdLossAdd">
                                    <td colspan="8">
                                        <!--<a data-toggle="modal"  id="financeFixedLossAdd" class="button btn-info btn-sm" style="float: left;">添加</a>-->
                                        <button type="button" data-toggle="modal"   class="btn-info btn-mini " style="float: left;" onclick="addItems(this,3);">添加</button>
                                    </td>
                                </tr>
                                </tbody>
                            </table>
                            <!--<button type="button" class="button btn-info btn-sm" style="text-align: left;">添加</button>-->
                        </div>
                    </div>
                        <!--人伤调查预估开始-->
                <div>
                            <!--标题-->
                        <div class="selfCarLossAssessmentTitle">
                                <div class="modelTitle">人伤调查预估</div>
                        </div>
                        <div class="lossContainer">
                            <table class="table table-bordered table-condensed">
                                <thead>
                                    <tr >
                                        <th> 任务号</th>
                                        <th> 伤者姓名</th>
                                        <th> 性别</th>
                                        <th> 年龄</th>
                                        <th> 户籍性质</th>
                                        <th>交通状态</th>
                                        <th> 诊疗方式</th>
                                        <th> 就诊医院</th>
                                        <th>定损总额</th>
                                        <th> 核损总额</th>
                                        <th> 任务状态</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr id="tr_humanFixedLossAdd">
                                        <td colspan="12">
                                            <button type="button" data-toggle="modal"  id="humanFixedLossAdd" onclick="humanFixedLossAdd(this);" class="btn-info btn-mini" style="float: left;">添加</button>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                            <table class="table table-bordered table-condensed">
                                <thead>
                                    <tr>
                                        <th>人伤跟踪</th>
                                        <th>跟踪期限</th>
                                        <th>跟踪人代码</th>
                                        <th>跟踪人</th>
                                        <th>跟踪人选择</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td>
                                            <label class="radio-inline">
                                                <input type="radio" class="" checked>是
                                            </label>
                                            <label class="radio-inline">
                                                <input type="radio" class="">否
                                            </label>
                                        </td>
                                        <td>
                                            <label><input class="width80 input-small" type="text" value="0"/>天</label>
                                        </td>
                                        <td></td>
                                        <td></td>
                                        <td>本人跟踪|选择跟踪人</td>
                                    </tr>
                                    <tr>
                                        <td colspan="4">
                                            <button type="button" class="btn-info btn-sm">跟踪失效</button>
                                            <button type="button" class="btn-info btn-sm">跟踪历史</button>
                                        </td>
                                        <td>
                                            <button type="button" class="btn btn-info btn-sm">保存</button>
                                        </td>
                                    </tr>
                                </tbody>

                            </table>
                            <table class="table table-condensed table-bordered">
                                <thead>
                                    <tr>
                                        <th>费用类型 </th>
                                        <th>费用金额</th>
                                        <th>说明</th>
                                        <th>操作</th>
                                    </tr>
                                </thead>
                                <tbody>
                                    <tr>
                                        <td><button type="button" class="btn-sm btn-info" style="width: auto">新增费用</button></td>
                                        <td></td>
                                        <td><button type="button" class="btn-sm btn-info">保存</button></td>
                                        <td></td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>
                    <!--人伤调查预估结束-->
                    <!--底部选择项-->
                <div style="text-align: center">
                            <button type="button" class="btn btn-sm"> 提交</button>
                            <button type="button" class="btn btn-sm"> 关闭</button>
                            <button type="button" class="btn btn-sm"> 历史信息</button>
                            <button type="button" class="btn btn-sm"> 重案/假案信息</button>
                            <button type="button" class="btn btn-sm"> 报案信息</button>
                            <button type="button" class="btn btn-sm"> 退回案件</button>
                            <button type="button" class="btn btn-sm"> 上报案件</button>
                    </div>
            </div>
        </div>
    </div>

    <!--本车定损添加-->
    <div id="localCar" class="modal fade ">
        <div class="modal-dialog " style="width: 100%;height:550px;">
            <div class="modal-content">
                <div class="modal-header">
                    <a class="close" data-dismiss="modal">×</a>
                    <h3>本车定损详情</h3>
                </div>
                <div class="modal-body">
                    <iframe id="localCarIframe" width="100%" height="550px;" frameborder="0"></iframe>
                </div>
                <div class="modal-footer">
                    <!--<a data-toggle="modal" href="#example3" class="btn btn-primary btn-large">保存</a>-->
                    <a href="#" class="btn" data-dismiss="modal">关闭</a>
                </div>
            </div>
        </div>
    </div>
    <!--三者定损添加-->
    <div id="threeFixedLoss" class="modal fade ">
        <div class="modal-dialog " style="width: 100%;height:550px;">
            <div class="modal-content">
                <div class="modal-header">
                    <a class="close" data-dismiss="modal">×</a>
                    <h3>三者定损详情</h3>
                </div>
                <div class="modal-body">
                    <iframe id="threeFixedLossIframe" width="100%" height="550px;" frameborder="0"></iframe>
                </div>
                <div class="modal-footer">
                    <!--<a data-toggle="modal" href="#example3" class="btn btn-primary btn-large">保存</a>-->
                    <a href="#" class="btn" data-dismiss="modal">关闭</a>
                </div>
            </div>
        </div>
    </div>

    <!--物损定损添加-->
    <div id="financeFixedLoss" class="modal fade ">
        <div class="modal-dialog " style="width: 100%;height:550px;">
            <div class="modal-content">
                <div class="modal-header">
                    <a class="close" data-dismiss="modal">×</a>
                    <h3>物损定损详情</h3>
                </div>
                <div class="modal-body">
                    <iframe id="financeFixedLossIframe" width="100%" height="550px;" frameborder="0"></iframe>
                </div>
                <div class="modal-footer">
                    <!--<a data-toggle="modal" href="#example3" class="btn btn-primary btn-large">保存</a>-->
                    <a href="#" class="btn" data-dismiss="modal">关闭</a>
                </div>
            </div>
        </div>
    </div>
    <div id="humanFixedLoss" class="modal fade ">
        <div class="modal-dialog " style="width: 100%;height:550px;">
            <div class="modal-content">
                <div class="modal-header">
                    <a class="close" data-dismiss="modal">×</a>
                    <h3>人伤定损添加</h3>
                </div>
                <div class="modal-body">
                    <iframe id="humanFixedLossIframe" width="100%" height="550px;" frameborder="0"></iframe>
                </div>
                <div class="modal-footer">
                    <!--<a data-toggle="modal" href="#example3" class="btn btn-primary btn-large">保存</a>-->
                    <a href="#" class="btn" data-dismiss="modal">关闭</a>
                </div>
            </div>
        </div>
    </div>
</body>
<!--去除遮罩层-->
<script>
    jQuery(function($){
        //解决模态框背景色越来越深的问题
        $(document).on('show.bs.modal', '.modal', function(event) {
            $(this).appendTo($('body'));
        }).on('shown.bs.modal', '.modal.in', function(event) {
            setModalsAndBackdropsOrder();
        }).on('hidden.bs.modal', '.modal', function(event) {
            setModalsAndBackdropsOrder();
        });

        function setModalsAndBackdropsOrder() {
            var modalZIndex = 1040;
            $('.modal.in').each(function(index) {
                var $modal = $(this);
                modalZIndex++;
                $modal.css('zIndex', modalZIndex);
                $modal.next('.modal-backdrop.in').addClass('hidden').css('zIndex', modalZIndex - 1);
            });
            $('.modal.in:visible:last').focus().next('.modal-backdrop.in').removeClass('hidden');
        }

        //覆盖Modal.prototype的hideModal方法
        $.fn.modal.Constructor.prototype.hideModal = function () {
            var that = this
            this.$element.hide()
            this.backdrop(function () {
                //判断当前页面所有的模态框都已经隐藏了之后body移除.modal-open，即body出现滚动条。
                $('.modal.fade.in').length === 0 && that.$body.removeClass('modal-open')
                that.resetAdjustments()
                that.resetScrollbar()
                that.$element.trigger('hidden.bs.modal')
            })
        }
    });
    </script>
</html>